package com.jieshuibao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.jieshuibao.model.db.Counselor;
import com.jieshuibao.model.db.Level;
import com.jieshuibao.model.db.User;
import com.jieshuibao.model.db.UserSearch;
import com.jieshuibao.model.domain.PagePhone;
import com.jieshuibao.model.domain.SerarchExample;
import com.jieshuibao.model.domain.UserDetails;

public interface UserExMapper {
	//搜索
	public List<UserSearch> selectSearchUser(PagePhone pagePhone);
	//查询级别名字
	public Level selectLevelName(@Param(value="phone")String phone);
	
	//个人主页
	public UserDetails selectPersonalUser(@Param(value="phone")String phone);
	//根据用户账号查找咨询师信息
	public Counselor selectCounseleorByPhone(@Param(value="phone")String phone);
	//根据真实手机号查询用户信息
	public List<User>  selectUserByPhone(@Param(value="phone")String phone);
	//修改用户的咨询次数视频次数 余额
	public void updateUserAdvisoryNum(User record);
	
	//咨询师列表
	public List<UserSearch> selectCounselorUser(SerarchExample example);
	//获取用户擅长业务
	public String selectAdeptName(@Param(value="adepts")String adepts);
	
	/**
	 * 修改用户问答卡余额
	 * @param user {phoneNumber:手机号码,QACardBlance:金额}
	 * @return
	 */
	public int updateUserQACardBlance(User user);
}
